home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / s-tasque.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  65 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                 S Y S T E M . T A S K I N G . Q U E U I N G              --
  6. --                                                                          --
  7. --                                  S p e c                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.5 $                             --
  10. --                                                                          --
  11. --       Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved        --
  12. --                                                                          --
  13. -- GNARL is free software; you can redistribute it  and/or modify it  under --
  14. -- terms  of  the  GNU  Library General Public License  as published by the --
  15. -- Free Software  Foundation;  either version 2, or (at  your  option)  any --
  16. -- later  version.  GNARL is distributed  in the hope that  it will be use- --
  17. -- ful, but but WITHOUT ANY WARRANTY;  without even the implied warranty of --
  18. -- MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. -- eral Library Public License  for more details.  You should have received --
  20. -- a  copy of the GNU Library General Public License along with GNARL;  see --
  21. -- file COPYING.LIB.  If not,  write to the  Free Software Foundation,  675 --
  22. -- Mass Ave, Cambridge, MA 02139, USA.                                      --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. with System.Tasking.Utilities;
  27. --  Used for, Utilities.ATCB_Ptr
  28.  
  29. package System.Tasking.Queuing is
  30.  
  31.    procedure Enqueue (E : in out Entry_Queue; Call : Entry_Call_Link);
  32.    --  Enqueue Call at the end of entry_queue E
  33.  
  34.    procedure Dequeue (E : in out Entry_Queue; Call : Entry_Call_Link);
  35.    --  Dequeue Call from entry_queue E
  36.  
  37.    function Head (E : in Entry_Queue) return Entry_Call_Link;
  38.    --  Return the head of entry_queue E
  39.  
  40.    procedure Dequeue_Head
  41.      (E    : in out Entry_Queue;
  42.       Call : out Entry_Call_Link);
  43.    --  Remove and return the head of entry_queue E
  44.  
  45.    function Onqueue (Call : Entry_Call_Link) return Boolean;
  46.    --  Return True if Call is on any entry_queue at all
  47.  
  48.    function Count_Waiting (E : in Entry_Queue) return Natural;
  49.    --  Return number of calls on the waiting queue of E
  50.  
  51.    procedure Select_Task_Entry_Call
  52.      (Acceptor     : Utilities.ATCB_Ptr;
  53.       Open_Accepts : Accept_List_Access;
  54.       Call         : out Entry_Call_Link;
  55.       Selection    : out Select_Index);
  56.    --  Select an entry for rendezvous
  57.  
  58.    procedure Select_Protected_Entry_Call
  59.      (Object    : Protection_Access;
  60.       Barriers  : Barrier_Vector;
  61.       Call      : out Entry_Call_Link);
  62.    --  Select an entry of a protected object
  63.  
  64. end System.Tasking.Queuing;
  65.